Optimal. Leaf size=152 \[ -\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (15 A+14 C) \tan (c+d x)}{15 d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}-\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{15 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4089, 4010, 4001, 3795, 203} \[ -\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (15 A+14 C) \tan (c+d x)}{15 d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}-\frac {2 C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{15 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3795
Rule 4001
Rule 4010
Rule 4089
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 C \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {\sec ^2(c+d x) \left (\frac {1}{2} a (5 A+4 C)-\frac {1}{2} a C \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{5 a}\\ &=\frac {2 C \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}+\frac {4 \int \frac {\sec (c+d x) \left (-\frac {a^2 C}{4}+\frac {1}{4} a^2 (15 A+14 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{15 a^2}\\ &=\frac {2 (15 A+14 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}+(-A-C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {2 (15 A+14 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}+\frac {(2 (A+C)) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 (15 A+14 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^2(c+d x) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 4.47, size = 160, normalized size = 1.05 \[ \frac {2 \cos ^2(c+d x) \sqrt {a (\sec (c+d x)+1)} \left (A+C \sec ^2(c+d x)\right ) \left (\tan \left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) ((15 A+13 C) \cos (2 (c+d x))+15 A-2 C \cos (c+d x)+19 C)-15 \sqrt {2} (A+C) \cot (c+d x) \sqrt {\sec (c+d x)-1} \tan ^{-1}\left (\frac {\sqrt {\sec (c+d x)-1}}{\sqrt {2}}\right )\right )}{15 a d (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 377, normalized size = 2.48 \[ \left [\frac {15 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right )^{3} + {\left (A + C\right )} a \cos \left (d x + c\right )^{2}\right )} \sqrt {-\frac {1}{a}} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, \cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (15 \, A + 13 \, C\right )} \cos \left (d x + c\right )^{2} - C \cos \left (d x + c\right ) + 3 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{30 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2}\right )}}, \frac {2 \, {\left ({\left (15 \, A + 13 \, C\right )} \cos \left (d x + c\right )^{2} - C \cos \left (d x + c\right ) + 3 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {15 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right )^{3} + {\left (A + C\right )} a \cos \left (d x + c\right )^{2}\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{15 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2}\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.21, size = 292, normalized size = 1.92 \[ -\frac {\frac {15 \, {\left (\sqrt {2} A + \sqrt {2} C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} + \frac {2 \, {\left (15 \, \sqrt {2} A a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 15 \, \sqrt {2} C a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (30 \, \sqrt {2} A a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 20 \, \sqrt {2} C a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (15 \, \sqrt {2} A a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 17 \, \sqrt {2} C a^{2} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.87, size = 586, normalized size = 3.86 \[ -\frac {\left (15 A \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+15 C \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+30 A \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right ) \cos \left (d x +c \right )+30 C \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right ) \cos \left (d x +c \right )+15 A \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right )+15 C \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sin \left (d x +c \right )+120 A \left (\cos ^{3}\left (d x +c \right )\right )+104 C \left (\cos ^{3}\left (d x +c \right )\right )-120 A \left (\cos ^{2}\left (d x +c \right )\right )-112 C \left (\cos ^{2}\left (d x +c \right )\right )+32 C \cos \left (d x +c \right )-24 C \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{60 d \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} \sec \left (d x + c\right )^{2}}{\sqrt {a \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^2\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________